package cn.wolfcode.wolf2world.repository;

import cn.wolfcode.wolf2world.domain.Destination;
import cn.wolfcode.wolf2world.domain.Strategy;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * @author 杨兴健
 * @Date 2020/8/9 20:04
 */
public interface DestinationRepository extends MongoRepository<Destination,String> {

    List<Destination> findByIdIn(List<String> refIds);

    List<Destination> findByDeep(Integer deep);

    List<Destination> findByParentName(String parentName);

    List<Destination> findByParentId(Pageable pageable, String id);

    /**
     * 根据名称查询目的地
     * @param name
     * @return
     */
    Destination findByName(String name);


}
